﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommandLine;
using CommandLine.Text;

namespace TerrariaWorldViewerCmd
{
    public class Options
    {
        [Option("s", "source", Required = true, HelpText = "The full path to the World file.")]
        public string SourceWorld = null;

        [Option("t", "target", Required = true, HelpText = "The full path of the PNG file to generate.")]
        public string TargetPng = null;

        [Option("y", "symbols", Required = false, HelpText = "Hide the symbols on the generated image.")]
        public bool UseSymbols = true;

        [Option("w", "wall", Required = false, HelpText = "Hide the maps walls on the generated image.")]
        public bool DrawWalls = true;


        [HelpOption(HelpText = "Display this help screen.")]
        public string GetUsage()
        {
            var help = new HelpText("Terraria World Viewer, Command line tool.");
            help.AdditionalNewLineAfterOption = false;
            help.AddPreOptionsLine("This is free software. You may redistribute copies of it under the terms of");
            help.AddPreOptionsLine("the MIT License <http://www.opensource.org/licenses/mit-license.php>.");
            help.AddPreOptionsLine("Usage: TerrariaWorldViewerCmd -s \"c:\\path-to-map\\MyWorld.wld\" -t \"c:\\output\\terraria-map.png\"");
            help.AddPreOptionsLine("       TerrariaWorldViewerCmd -s \"c:\\path-to-map\\MyWorld.wld\" -t \"c:\\output\\terraria-map.png\" -wy");
            help.AddOptions(this);

            return help;
        }
    }
}
